/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tugas_string;

/**
 *
 * @author novaldebbyp
 */
public class MainString {
    public static void main(String[] args){
        /* Nomor 1 */
        String MyInstitusi = "Did Hannah see bees? Hannah did.";
        System.out.println("Length\t\t: "+MyInstitusi.length());
        System.out.println("Char At 12\t: "+MyInstitusi.charAt(12));
        System.out.println("Char b\t\t: "+MyInstitusi.charAt(15)+"\n");
        
        /* Nomor 2 */
        String car = "Was it a car or a cat I saw?";
        System.out.println("Length\t\t: " + car.substring(9,12).length());
        System.out.println("Substring\t: " + car.substring(9,12));
    }
}
